
package com.aaa.phone.controller.resetpasswordcontroller;

import com.aaa.phone.service.resetpasswordservice.IResetPasswordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * @program: battery
 * @description: 更改密码
 * @author: 王璐
 * @create: 2018-12-18 19:05
 **/
@CrossOrigin
@RestController
@RequestMapping("/resetPsw")
public class ResetPassword {

    /**
     * 自动注入
     */
    @Autowired
    private IResetPasswordService service;

    /**
     * @Description: 更改密码
     * @Author: 王璐
     * @Date: 2018/12/14
     */
    @RequestMapping("/updatePsw")
    public int addUser(String tel, String psw){
        //调用service层的更改密码，返回是否更改成功
        return service.resetPsw(tel,psw);
    }
}
